let base,hrefUrl = location.href
if(hrefUrl.includes('ccs168')){
  base = 'https://newmall.ccs168.cn/'
}else{
  base = 'https://www.ibears.top/' 
}
const domain = base + 'api/';
const api = domain + 'admin/';

module.exports = {
  //管理员
  BASE:base,
  ADMIN: {
    LOGINOUT:api+'user/logout',    // 登出接口
    LOGIN: api + 'user/login',      //登录接口
    UPDUSERPWD: api + 'user/updUserPWD', //重置密码接口
    randomImgVerifyCode: domain + 'base/verifyCode/randomImgVerifyCode', //重置密码接口
    
  },

  INDEX: {
    adSpaceList: api+"indexManage/advertisementSpace/list",//获取首页广告位
    adSpaceSave: api+"indexManage/advertisementSpace/save",//保存首页广告位
    bannerList: api+"indexManage/banner/list",//获取首页banner
    bannerSave: api+"indexManage/banner/save",//保存首页banner
    functionMenuList: api+"indexManage/functionMenu/list",//获取首页功能菜单
    functionMenuSave: api+"indexManage/functionMenu/save",//保存首页功能菜单
    hotProductList: api+"indexManage/hotProduct/list",//热门商品列表
    hotProductSave: api+"indexManage/hotProduct/save",//热门商品列表保存
    newProductList: api+"indexManage/newProduct/list",//新品列表,
    newProductSave: api+"indexManage/newProduct/save",//新品保存
    disablePlate: api+"indexManage/plate/disable/",//禁用板块
    enablePlate: api+"indexManage/plate/enable/",//启用板块
    plateList: api+"indexManage/plate/list",//获取首页板块列表
    popAdList:api+"indexManage/popAdvertisement/list",//获取首页弹窗广告
    popAdSave: api+"indexManage/popAdvertisement/save",//保存首页弹窗广告
    waterfallList: api+"indexManage/waterfallsFlow/list",//获取首页瀑布流列表
    waterfallSave: api+"indexManage/waterfallsFlow/save",//保存首页瀑布流
  },
  LIST:{
    expQueryParam:api+'action/order/expQueryParam',
    ADVERTISEMENTLIST:api+'advertisement/page',
    ADVERTISEMENTSAVE:api+'advertisement/save',
    ADVERTISEMENDELETE:api+'advertisement/delete',
    ADVERBYID:api+'advertisement',
    USERLIST:api+'app/user/page',
    USERREMARK:api+'app/user/remark',
    FROZEN:api+'app/user/frozen/y/',
    UNFROZEN:api+'app/user/frozen/n/',
    REBATE_N: api+"app/user/rebate/n/",
    REBATE_Y: api+"app/user/rebate/y/",
    USERSUB: api+"app/user/sub/",
    USERDETAIL:api+'app/user/',
    REFUNDAUDIT:api+'refund/audit',
    REFUNDCONFIRM: api+"refund/confirm/",
    REFUNDCONFIRM1: api+"refund/confirm/rmb/",
    REFUNDPAGE:api+'refund/page',
    REFUNDBYID:api+'refund/',
    //商品接口
    PRODUCTDELETE:api+'product/delete',//删除
    PRODUCTEDIT:api+'product/edit',//新增编辑商品
    PRODUCTFREIGHT:api+'order/get/fright/',//查询运费
    PRODUCTFREIGHTSAVE:api+'order/fright/',//保存运费信息
    PRODUCTBYPAGE:api+'product/page',//后台查询商品
    PRODUCTSHELVES:api+'product/shelves',//上下架
    PRODUCTBYID:api+'product',//查询详情
    distributionSave:api+'product/distribution/save',//查询详情
    findModelByProductCode:api+'product/findModelByProductCode',//通过商品编号查询商品规格库存
    updateModelStock:api+'product/updateModelStock',//修改指定型号的库存
    bannerPage:api+'index/banner/page',//修改指定型号的库存
    bannerSave:api+'index/banner/save',//修改指定型号的库存
    bannerByid:api+'index/banner',//修改指定型号的库存
    bannerDelete:api+'index/banner/delete',//修改指定型号的库存
    //分类
    SORTEDIT:api+'category/save',//新增编辑分类
    SORTDELETE:api+'category/delete',//删除分类
    SORTENABLE:api+'category/enable',//启用禁用分类
    SORTBYPAGE:api+'category/page',//后台查询商品分类
    SORTBYEDIT:api+'category',
    firstParentPage:api+'category/firstParent/page',
    parentPage:api+'category/parent/page',
    //系统
    hotTagList:base+'api/admin/system/hot/tag/list',
    hotTagSave:base+'api/admin/system/hot/tag/save',
    actionOrderPage:base+'api/admin/action/order/page',
    actionOrderExport:base+'api/admin/action/order/orderExport',
    actionOrderDetail:base+'api/admin/action/order/',
    
    findAbutMall:base+'api/admin/index/plate/findAbutMall',
    findContact:base+'api/admin/index/plate/findContact',
    findFunction:base+'api/admin/index/plate/findFunction',
    findRegister:base+'api/admin/index/plate/findRegister',
    saveAbutMall:base+'api/admin/index/plate/saveAbutMall',
    saveContact:base+'api/admin/index/plate/saveContact',
    saveFunction:base+'api/admin/index/plate/saveFunction',
    saveRegister:base+'api/admin/index/plate/saveRegister',
    supplierPaper:base+'api/admin/supplier/page',
    supplierSave:base+'api/admin/supplier/save',
  },
  ORDER: {
    orderExport: api+"order/orderExport",//导出订单
    orderList: api+"order/page",//分页查询列表
    orderRemark: api+"order/remark/",//商家备注
    orderDetail: api+"order/",//查询详情
    refundAudit: api+"refund/audit", //审核申请 同意或拒绝
    refundConfirm: api+"refund/confirm/",//确认退款
    refundList: api+"refund/page",//分页查询售后申请
    refundDetail: api+"refund/",//查询详情
    cancelOrder :api+"order/cancel/admin/", //取消订单
    orderSend :api+"order/orderSend", //取消订单
    statisticstoday :api+"index/statistics/today", //取消订单
    statistics :api+"index/statistics/", //取消订单
    actionOrderSend :api+"action/order/orderSend", //取消订单
    orderSendExcel :api+"order/orderSendExcel", //取消订单
    actionOrderSendExcel :api+"action/order/orderSendExcel", //取消订单
  },
  ORDERTWO: {
    orderExport: api+"ordinary/order/orderExport",//导出订单
    orderList: api+"ordinary/order/page",//分页查询列表
    orderRemark: api+"ordinary/order/remark/",//商家备注
    orderDetail: api+"ordinary/order/",//查询详情
    cancelOrder :api+"ordinary/order/cancel/admin/", //取消订单
    orderSend :api+"ordinary/order/orderSend", //取消订单
    actionOrderSendExcel :api+"ordinary/order/orderSendExcel", //取消订单
  },
  SYS: {
    articleList: api+"system/article/list",//查询系统文章
    articleSave: api+"system/article/save",//保存文章
    rebateRules: api+"system/findRebateRules",//返佣规则获取
    findSlogan:api+"system/findSlogan",//获取平台slogan
    helpDel: api+"system/help/delete",//删除帮组中心文章
    helpList:api+"system/help/page",//分页查询帮助中心文章
    helpSave: api+"system/help/save",//保存帮组中心
    helpDetail:api+"system/help/",//查询帮助中心
    hotTagList:api+"system/hot/tag/list",//获取热门标签
    hotTagSave: api+"system/hot/tag/save",//保存热门标签
    memberDesignGet: api+"system/member/designated/get",//获取分销资格规则
    memberDesignSave:api+"system/member/designated/save",//保存分销资格规则
    divideGet: api+"system/member/divides/get",
    divideSave: api+"system/member/divides/save",
    saveRebateRules: api+"system/saveRebateRules", //保存返佣规则
    saveSlogan:api+"system/saveSlogan/",//保存平台slogan

    honorRulesList: api+"rules/HonorRewardRules/page",//荣誉奖励
    honorRulesSave: api+"rules/HonorRewardRules/save",
    honorRulesDel: api+"rules/HonorRewardRules",
  },
  // 二维码
  QRCODE:{
    personalPage:api+"qr/personal/page",//获取个人二维码模板列表
    personalSave:api+"qr/personal/save",//保存个人二维码模板
    personalDelete:api+"qr/personal",//删除个人二维码模板
    personalFind:api+"qr/personal/find",//获取商品二维码信息模
    productById:api+"qr/product/find",//获取商品二维码信息模板
    productSave:api+"qr/product/save",//保存商品二维码信息模板
    promptFind:api+"qr/prompt/find",//获取无二维码提示
    promptSave:api+"qr/prompt/save",//保存无二维码提示
    personalById:api+'qr/personal/one'
  },
  //运营评价
  EVAL: {
    batchAdd:api+"evaluation/batchAdd",
    disable: api+"evaluation/disable/",
    list: api+"evaluation/page",
    top:api+"evaluation/top/",
    detail: api+"evaluation/",
    delete:api+'evaluation/delete/'
  },
  //用户上级调整
  PARENT: {
    change: api+"app/parent/update/flow/change",
    list: api+"app/parent/update/flow/page",
    detail:api+"app/parent/update/flow/",
    remark: api+"app/parent/update/flow/remark/",
  },
  //用户临时等级调整
  TEMPORARYLEVEL: {
    del: api+"user/temporaryLevel/delete",
    flowList: api+"user/temporaryLevel/flow/page",
    list: api+"user/temporaryLevel/page",
    save: api+"user/temporaryLevel/save",
    detail:api+"user/temporaryLevel/",
    remark: api+"user/temporaryLevel/remark/",
  },
  //角色等级管理
  MEMBERLEVEL: {
    del: api+"member/level/delete",
    list: api+"member/level/page",
    save:api+"member/level/save",
    detail :api+"member/level/"
  },
  //大家问问
  ASK: {
    batchSave: api+"ask/batchSave",
    disable: api+"ask/disable/",
    list: api+"ask/page",
    save: api+"ask/save",
    detail: api+"ask/",
  },
  //排行榜
  RANK: {
    list: api+"leader/board/findRank",
    add: api+"leader/board/save",
    del: api+"leader/board/"
  },
  //商品销量
  COMMODITY: {
    disable: api+"product/sales/disable/",
    list: api+"product/sales/page",
    save: api+"product/sales/save",
    detail: api+"product/sales/"
  },
  ADJUST: {
    adjustSave: api+"adjustment/adjustmentSave",
    list:api+"adjustment/page",
    remark: api+"adjustment/remark"
  },
  SYSTEM:{
    ADMINUPLOADFILE:domain + 'base/admin/getCOSUploadUrl',  // 获取阿里云上传链接
    UPLOADFILEBYCOS:domain+'base/admin/getCOSUploadUrl',     // 获取腾讯云上传链接
    LOADDICTIONARY:domain+'base/app/loadDictionary/',   // 获取系统字典

    // 角色管理
    FINDAPPROLEBYPAGE:api+'role/page',   // 分页获取角色列表
    GETALLAPPPERMISSION:api + 'permission/list', // 获取所有权限列表
    GETROLEINFOBYID:api + 'role/', //get {roleId} // 获取角色详情
    DELETEROLEBYID:api+'role',   // 删除角色记录
    SAVEAPPROLE:api+'role/save',   // 保存角色
     // 管理员
    FINDUSERPERMISSIONS:api+'menu/listByUser',     // 获取用户拥有的左侧菜单权限
    FINDADMINUSERBYPAGE:api+'user/page',   //  分页获取用户列表
    FINDADMINUSERDETAILBYUSERID:api+'user/',   // 用户详情 get {userId}
    SAVEADMINUSER:api+'user/save',    // 保存用户
    DELETEADMINUSERBYID:api+'user',     // 删除 del  {userId}
    enable:api+"user/enable/",
  },
  WITHDRAW: {
    list: api+"withdraw/page",
    remark: api+"withdraw/remark",
    review: api+"withdraw/review",
    rule: api+"withdraw/rule",
    save: api+"withdraw/rule/save"
  },
  VERIFY: {
    verify: base+"api/base/verifyCode/sendMsgVerifyCode"
  },
  KOL: {
    del: api+"kol/delete/",
    list: api+"kol/page",
    save: api+"kol/save",
    stop: api+"kol/stop/",
    detail: api+"kol/"
  },
  KD: {
    detail: base+"api/kd/push/findKdniaoTraces"
  },
  FLOW: {
    list:api+"point/flow/platform_flow/page"
  }
}
